package com.zy.edu.bean;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuangHaiShui
 * @since 2021-07-20
 */
@TableName("course_chapter")
@Data
public class CourseChapter implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;
    /**
     * 课时顺序
     */
    @NotNull(message = "课时顺序不能为空;")
    private Integer num;
    /**
     * 课课时名称
     */
    @NotBlank(message = "课时名称不能为空;")
    private String name;
    /**
     * 课程id
     */
    @TableField("course_id")
    private String courseId;
    /**
     * 简介
     */
    private String introduction;
    @TableField("create_time")
    @JSONField(format="yyyy-MM-dd")
    private Date createTime;


    @JSONField(serialize = false)
    private Integer status;

    //该课时的上课记录,老师签到
    @TableField(exist = false)
    private CourseChapterClass record;

    @TableField(exist = false)
    private List<CourseChapterVideo> videoList;

    @TableField(exist = false)
    private List<CourseChapterDoc> docList;
    //作业列表
    @TableField(exist = false)
    private List<CourseChapterHomework> homeList;

    //学生对于该课时的签到记录
    @TableField(exist = false)
    private CourseChapterSign signRecord;



}
